package com.hzdl.cinema.web.servlet;

        import com.hzdl.cinema.Service.RefundService;
        import com.hzdl.cinema.Service.impl.RefundServiceImpl;
        import com.hzdl.cinema.domain.PageBean;
        import com.hzdl.cinema.domain.Ticket;


        import javax.servlet.ServletException;
        import javax.servlet.annotation.WebServlet;
        import javax.servlet.http.HttpServletRequest;
        import javax.servlet.http.HttpServletResponse;
        import java.io.IOException;

@WebServlet("/refund/*")
public class RefundServlet extends BaseServlet {
    RefundService refundService =new RefundServiceImpl();
    public void seeTicket(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String rows = request.getParameter("rows");

        String currentPage = request.getParameter("currentPage");
        String select_input = request.getParameter("select_input");

        PageBean<Ticket> pageBean= refundService.seeTicke(Integer.valueOf(rows),Integer.valueOf(currentPage),select_input);
        writeValue(response,pageBean);

    }

    public void numTicket(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        BigDecimal bigDecimal=  ticketService.numTicket();
//        writeValue(response,bigDecimal);
    }

    public void seeStudio(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        String studioId = request.getParameter("studioId");
//        Studio studio=scheduleService.seeStudio(studioId);
//        writeValue(response,studio);
    }
    public void updateTicket(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String id = request.getParameter("id");

        refundService.updateTicket(id);
    }
}
